<div class="listArea l">
  <div class="grybox">
    <h3>Merchant List</h3>

    <?php include_partial('global/pager', array('pager' => $pager, 'sort' => array(MerchantForm::SORT_NAME => 'Name', MerchantForm::SORT_CREATED_AT => 'Created Date'))) ?>

    <div class="listBox" style="clear:both;">
      <div class="listWarp1">Name</div>
      <div class="listWarp1">Email</div>
    </div>
    <div class="listBoxWht">
      <?php if ($pager->getNbResults()) : ?>
      <?php foreach ($pager->getResults() as $merchant) : ?>
      <div class="frmRow<?php if ($merchant->getStatus() == Constants::STATUS_INACTIVE) : ?> frmRowInactive<?php endif; ?>">
        <div class="listWarp1"><?php echo $merchant->getName(); ?></div>
        <div class="listWarp1"><?php echo $merchant->getEmail(); ?></div>
        <div class="editWarp"><a href="<?php echo url_for('@merchant_edit?id=' . $merchant->getId()); ?>#f">Edit</a></div>
        <div class="contWarp"><?php echo link_to('Users', '@user_add?mid=' . $merchant->getId())?></div>
        <div class="contWarp"><?php echo link_to('Cinemas', '@cinema_add?mid=' . $merchant->getId())?></div>
        <?php if ($merchant->getStatus() == Constants::STATUS_ACTIVE) : ?><div><a href="<?php echo url_for('@merchant_add?did=' . $merchant->getId()); ?>"><img src="/images/admin/icon_cancel.gif" width="12" height="12" alt="Deactive" style="padding-top: 1px; padding-left: 6px;" /></a></div><?php endif; ?>
      </div>
      <?php endforeach; ?>
      <?php endif; ?>
    </div>
  </div>
</div>


<form class="f" action="?#f" method="POST">
  <div class="grybox">
    <h1><?php if (isset($isEdit)) : ?>Edit<?php else : ?>Add<?php endif; ?> Merchant</h1>
    <div class="fmArea">
      <?php echo include_partial('global/errorsList', array('forms' => array($form), 'global' => $errorCollector)); ?>
      <?php if ($sf_request->hasParameter('success')) : ?><div class="succDis"><?php echo LangUtil::getText('message_save_success'); ?></div><?php endif; ?>
      <div class="singleColumn">

        <h2></h2>
        <div class="frmRow">
          <?php echo $form[MerchantForm::FIELD_NAME]->renderLabel(null, array('class'=>'frmLable')); ?>
          <div class="frmtxtBox"><?php echo $form[MerchantForm::FIELD_NAME]->render(array('class'=>'txtBox1')); ?></div>
        </div>
        <div class="frmRow">
          <?php echo $form[MerchantForm::FIELD_EMAIL]->renderLabel(null, array('class'=>'frmLable')); ?>
          <div class="frmtxtBox"><?php echo $form[MerchantForm::FIELD_EMAIL]->render(array('class'=>'txtBox1')); ?></div>
        </div>
        <div class="frmRow">
          <?php echo $form[MerchantForm::FIELD_PHONE]->renderLabel(null, array('class'=>'frmLable')); ?>
          <div class="frmtxtBox"><?php echo $form[MerchantForm::FIELD_PHONE]->render(array('class'=>'txtBox2')); ?></div>
        </div>
        <div class="frmRow">
          <?php echo $form[MerchantForm::FIELD_MOBILE]->renderLabel(null, array('class'=>'frmLable')); ?>
          <div class="frmtxtBox"><?php echo $form[MerchantForm::FIELD_MOBILE]->render(array('class'=>'txtBox2')); ?></div>
        </div>
        <div class="frmRow">
          <?php echo $form[MerchantForm::FIELD_FAX]->renderLabel(null, array('class'=>'frmLable')); ?>
          <div class="frmtxtBox"><?php echo $form[MerchantForm::FIELD_FAX]->render(array('class'=>'txtBox2')); ?></div>
        </div>
        <div class="frmRow">
          <?php echo $form[MerchantForm::FIELD_COMMISSION]->renderLabel(null, array('class'=>'frmLable')); ?>
          <div class="frmtxtBox"><?php echo $form[MerchantForm::FIELD_COMMISSION]->render(array('class'=>'txtBox2')); ?> %</div>
        </div>
        <div class="frmRow">
          <?php echo $form[MerchantForm::FIELD_BOOKING_FEE]->renderLabel(null, array('class'=>'frmLable')); ?>
          <div class="frmtxtBox"><?php echo $form[MerchantForm::FIELD_BOOKING_FEE]->render(array('class'=>'txtBox2')); ?> AUD</div>
        </div>
        <div class="frmRow">
          <?php echo $form[MerchantForm::FIELD_ABN]->renderLabel(null, array('class'=>'frmLable')); ?>
          <div class="frmtxtBox"><?php echo $form[MerchantForm::FIELD_ABN]->render(array('class'=>'txtBox2')); ?></div>
        </div>
        <div class="frmRow">
          <?php echo $form[MerchantForm::FIELD_ACCOUNT_NAME]->renderLabel(null, array('class'=>'frmLable')); ?>
          <div class="frmtxtBox"><?php echo $form[MerchantForm::FIELD_ACCOUNT_NAME]->render(array('class'=>'txtBox2')); ?></div>
        </div>
        <div class="frmRow">
          <?php echo $form[MerchantForm::FIELD_BSB]->renderLabel(null, array('class'=>'frmLable')); ?>
          <div class="frmtxtBox"><?php echo $form[MerchantForm::FIELD_BSB]->render(array('class'=>'txtBox2')); ?></div>
        </div>
        <div class="frmRow">
          <?php echo $form[MerchantForm::FIELD_ACCOUNT_NUM]->renderLabel(null, array('class'=>'frmLable')); ?>
          <div class="frmtxtBox"><?php echo $form[MerchantForm::FIELD_ACCOUNT_NUM]->render(array('class'=>'txtBox2')); ?></div>
        </div>
        <!--
        <div class="frmRow">
          <?php //echo $form[MerchantForm::FIELD_BANK_DETAILS]->renderLabel(null, array('class'=>'frmLable')); ?>
          <div class="frmtxtBox"><?php //echo $form[MerchantForm::FIELD_BANK_DETAILS]->render(array('class'=>'wideTxtArea', 'rows'=>5)); ?></div>
        </div>
        -->
        <div class="frmRow">
          <?php echo $form[MerchantForm::FIELD_STATUS]->renderLabel(null, array('class'=>'frmLable')); ?>
          <div class="frmtxtBox"><?php echo $form[MerchantForm::FIELD_STATUS]->render(array('class'=>'drpBox1')); ?></div>
        </div>
      </div>

      <div class="butArea">
        <input name="" type="submit" class="buttnSrh11" value="Save Changes" />
      </div>

    </div>
  </div>
  <?php echo $form['_csrf_token']->render(); ?>
</form>